import { LOGIN, USERINFO } from "@/services/api";
import { request, METHOD } from "@/plugins/request";

/**
 * 登录服务
 * @param name 账户名
 * @param password 账户密码
 * @returns {Promise<AxiosResponse<T>>}
 */
export async function login(name, password) {
  return request(LOGIN, METHOD.POST, {
    name: name,
    password: password
  });
};
export async function userInfo() {
  return request(USERINFO, METHOD.GET);
}
export default {
  login,
  userInfo
};
